package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.PartnerDao;
import com.home.qh.model.Partner;
import com.home.qh.service.PartnerManager;

/**
 * Implementation of RoleManager interface.
 *
 * @author <a href="mailto:dan@getrolling.com">Dan Kibler</a>
 */
@Service("partnerManager")
public class PartnerManagerImpl extends GenericManagerImpl<Partner, Long> implements PartnerManager {
	PartnerDao partnerDao;

    @Autowired
    public PartnerManagerImpl(PartnerDao partnerDao) {
        super(partnerDao);
        this.partnerDao = partnerDao;
    }

	public List<Partner> getPartnerByCodeAndName(String partnerCode,
			String partnerName) {
		return partnerDao.getPartnerByCodeAndName(partnerCode, partnerName);
	}

	public List<Partner> getPartnerByPartner(Partner partner, String sort, boolean desc, int startResult, int maxResults) {
		return partnerDao.getPartnerByPartner(partner, sort, desc, startResult, maxResults);
	}

}